<!DOCTYPE html>
<html>
<head>
	<title>审核设置</title>
	<include file='public/head'>
	<style>
		.layui-legend-size{font-size:14px !important;}
		.layui-nopadding{padding:0 !important;}
		.layui-overflow{overflow:auto;}
		.layui-nomargin{margin: 0 !important;}
		.layui-bottom{border-bottom:1px solid rgb(226, 226, 226);}
		.layui-input{height:30px !important; }
		.layui-form-search-item .layui-inline{margin-bottom: 5px;} 
		.layui-form-search-item label{margin-left: 15px;}
		.layui-form-item label{width: 100px;}
		.layui-table-page {padding: 7px 0px 0px;}
		.layui-field-padding{border-width: 1px;padding:0 0 5px 10px;}
	</style>		
</head>
<body>
<!-- layui-tab开始 -->
<div class="layui-tab " lay-filter="demo-tab">
	<form id="f" class="layui-form layui-form-pane" action="" style="margin-left:30px">
		<div class="layui-form-item" pane="">
		    <label class="layui-form-label" style="width:180px">审核开启/开关</label>
		    <div class="layui-input-block" style="margin-left:200px">
		    	<input type="hidden" name="audit_open" value="2">
		      	<input type="checkbox" name="audit_open" lay-skin="switch" lay-filter="switchTest" title="开关" value="1" <?php if (isset($config['audit_open']) && $config['audit_open'] == 1){echo 'checked';}?>>
		    </div>
		</div>
	</form>
</div>
<include file='public/scripts'>
<script type="text/javascript">

function tijiao(){
	let f = $('#f');
	let da = f.serialize();
	//提交
	$.ajax({
		url:"{:cmf_plugin_url('Goods://goods_audit/auditSet')}",
		data: da,
		type:'post',
		success:function(data){
			if (data.code == 1) {
				layer.msg(data.msg,{icon:1,time:1500},function(){
					parent.layer.closeAll();
					parent.location.reload(); 
				});
			} else {
				layer.msg(data.msg,{icon:2,time:1500});
			}
		},
		error:function()
		{
			layer.msg('系统错误',{icon:2,time:1500});
		}
	})
}

</script>
</body>
</html>